Gitolite and Gitlab - How the `www-data` user can checkout?

Posted by mblaettermann on Server Fault See other posts from Server Fault or by mblaettermann
Published on 2012-09-21T14:10:37Z Indexed on 2012/09/21 15:40 UTC
Read the original article Hit count: 263

Filed under:
|

I have just installed Gitolite and Gitlab and I am very happy with it. Everything works fine so far.
I can create repos, push to them, clone them on other clients on the network. Great!

But now I wanted to do some post-receive hooks.
I.e. when I push to some repo, this repo should be checked out on the server in the /var/www/repos directory.

I did this with Gitlabs Deploy Hooks and this Endpoint-Script.

The problem is that the scripts are run under the user "www-data" which has no access to gitlab/gitolite.

How do I change this?
I need to be able to checkout repos with www-data user and using git@server/repo.git syntax.

© Server Fault or respective owner

Related posts about git

Related posts about gitolite